]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ScreenShield: update the displayed title when the source changes
authorGiovanni Campagna <gcampagna@src.gnome.org>
Fri, 3 Aug 2012 23:16:07 +0000 (01:16 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 6 Aug 2012 21:02:31 +0000 (23:02 +0200)
Notifications in the lock screen need to watch signals on source
and react accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=681143

js/ui/screenShield.js

index 3844a00184e86bfdf9bfa141dac63b40605f8bee..c65474174850ed7e804ea5e2d7757bb44eb6b440 100644 (file)
@@ -173,7 +173,8 @@ const NotificationsBox = new Lang.Class({
         }
 
         obj.contentUpdatedId = item.connect('content-updated', Lang.bind(this, this._onItemContentUpdated));
-        obj.sourceCountChangedId = item.source.connect('count-changed', Lang.bind(this, this._onSourceCountChanged));
+        obj.sourceCountChangedId = item.source.connect('count-changed', Lang.bind(this, this._onSourceChanged));
+        obj.sourceTitleChangedId = item.source.connect('title-changed', Lang.bind(this, this._onSourceChanged));
         obj.sourceDestroyId = item.source.connect('destroy', Lang.bind(this, this._onSourceDestroy));
         this._items.push(obj);
 
@@ -194,7 +195,7 @@ const NotificationsBox = new Lang.Class({
         this._updateItem(obj);
     },
 
-    _onSourceCountChanged: function(source) {
+    _onSourceChanged: function(source) {
         let obj = this._items[this._findSource(source)];
         this._updateItem(obj);
     },
@@ -217,6 +218,7 @@ const NotificationsBox = new Lang.Class({
             // make into a resident item
             obj.sourceBox.destroy();
             obj.sourceBox = obj.countLabel = null;
+            obj.resident = true;
 
             obj.item.prepareNotificationStackForShowing();
             this._residentNotificationBox.add(obj.item.notificationStackView);